import request from "../utils/request.js";

export const getGradeListApi =()=>{
    return request({
        url:"/grade/",
        method: "get",
    })
}

export const deleteGradeApi =(grade_id)=>{
    return request({
        url:`/grade/${grade_id}`,
        method: "delete",
    })
}

export const updateGradeApi =({grade_id,student_name,course_name,grade})=>{
    return request({
        url:`/grade/${grade_id}`,
        method: "put",
        data:{
            student_name,
            course_name,
            grade
        }
    })
}
export const addGradeApi =({student_name,course_name,grade})=>{
    return request({
        url:"/grade/",
        method: "post",
        data:{
            student_name,
            course_name,
            grade
        }
    })
}
export const getGradeNameApi =(search)=>{
    return request({
        url:"/grade/search",
        method: "get",
        params:{
            search
        }

    })
}